home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / batchut / makemenu.zip / READ.ME < prev    next >
Text File  |  1989-05-09  |  12KB  |  280 lines

  1. This is a subset of the EasyTool Utilities that contains all the utilities
  2. you need to run MAKEMENU.BAT.  The following describes how to use MAKEMENU.
  3. It is excerpted from the EasyTool Utilities User Guide.
  4.  
  5. We then tell you more about the EasyTool Utilities, including how to get your
  6. complete set.
  7.  
  8. =============================================================================
  9.  
  10. MAKEMENU Batch File
  11.  
  12. Purpose:
  13. To create a batch file that provides a menu of commands.
  14.  
  15. Applications:
  16. Used to create a batch file that displays text within a box, 
  17. centered on the screen.
  18. Used to create multi-level menu systems.
  19.  
  20. Usage:
  21. MAKEMENU  name-of-menu
  22.  
  23. For example, "MAKEMENU CLEANUP" would let you create a menu batch 
  24. file named "CLEANUP.BAT".
  25.  
  26. Name-of-menu must not be the same as the name of any existing 
  27. program, batch file, or DOS command, since  MAKEMENU will create 
  28. a batch file with the name "name-of-menu.BAT".
  29.  
  30. HOW THE MENU THAT YOU CREATE WORKS:
  31.  
  32. MAKEMENU asks you questions to create a menu.  The menu is a 
  33. batch file that gives you choices (options) of what to do.  When 
  34. you press the appropriate key, the menu does what you chose.  It 
  35. then asks you to press any key to return to the main screen of 
  36. choices.
  37.  
  38. Although you can always exit from your menu by pressing Ctrl-C, 
  39. you'll probably want to specify a key to press to exit.
  40.  
  41. MAKEMENU asks you to specify:
  42.  
  43. a) A descriptive name for the menu (for example "Main Menu"): 
  44.  
  45. The descriptive name that you specify will be appended to the 
  46. phrase "Press any key to return to ".  The resulting phrase will 
  47. be shown whenever you are returning to the menu's main screen, to 
  48. help re-orient you.  For example, suppose you specify "Clean-up 
  49. Menu" as your brief description.  Whenever you have executed a 
  50. choice on the menu, and you are about to return to the menu, 
  51. "Press any key to return to Clean-up Menu..." will appear on the 
  52. screen.
  53.  
  54. b) The menu's text:
  55.  
  56. This is normally a menu title, followed by a list of choices and 
  57. instructions.  For example:
  58.  
  59.      C L E A N - U P   M E N U
  60.  
  61.      Press:  D for directory listing
  62.              E to erase a set of files
  63.              X to exit
  64.  
  65.      Your choice:
  66.  
  67. MAKEMENU draws a box around the text you specify and centers it 
  68. on the screen.  The cursor will be positioned after the text, 
  69. within the box.
  70.  
  71. You can create your menu's screen with a word processor in non-
  72. document mode or with a text editor, if you prefer that to typing 
  73. it at the keyboard:  just put the text into a file named "name-
  74. of-menu.MNU" (for example, "CLEANUP.MNU").  When you type your 
  75. text at the keyboard, MAKEMENU creates just such a file.  In the 
  76. future, when you want to revise your menu, you can modify this 
  77. file with a text editor before starting MAKEMENU.
  78.  
  79. After you've specified how the screen appears, MAKEMENU asks you 
  80. to specify the following until you have no more options left to 
  81. specify:
  82.  
  83. c) A key that chooses an option.  You simply press the key.  In a 
  84. moment it will appear on the screen.  Some keys, such as "Page 
  85. Down", will appear as graphic characters.  Others, such as the 
  86. Return key, will be spelled out or abbreviated.
  87.  
  88. d) what happens when you press the key.  You simply type the 
  89. command line(s) that do what you want.  For example, you could 
  90. enter the command line "DIR | PAGE".  
  91.  
  92. Any batch file that you call (invoke) should be preceded with 
  93. "COMMAND /C" if you want execution to return to the menu batch 
  94. file when done.  (See "Executing Batch Files Within Batch 
  95. Files".)  This is because the command lines that you type are 
  96. directly entered into the batch file.  For example, "COMMAND /C 
  97. SUBMENU" would invoke SUBMENU, which itself could be another menu 
  98. batch file.  By calling menus you can create a multi-level menu 
  99. system.
  100.  
  101. You can use labels, insert comments, and do anything else allowed 
  102. in a batch file.  The labels "START" and "EXIT" are automatically 
  103. included in the menu batch file.  To specify returning to the 
  104. menu's main screen, enter the command line "GOTO START".  To 
  105. specify exiting from the menu, enter "GOTO EXIT".
  106.  
  107. You can make a menu that simply shows text on the screen and then 
  108. exits, by specifying menu text but not specifying any options.
  109.  
  110. After you have completely specified the menu, MAKEMENU 
  111. automatically invokes it so that you can test what you've just 
  112. created.
  113.  
  114. MODIFYING YOUR MENU:
  115.  
  116. When you are done with MAKEMENU, you can modify the lines in the 
  117. menu batch file that you have created, just like any other batch 
  118. file.  Modify the PUT commands to change the menu's colors, to 
  119. change the screen position of the menu or of the cursor, etc.  
  120. (Type "PUT ?" for instructions on using PUT.)
  121.  
  122. You may even prefer to use MAKEMENU to simply create a skeleton 
  123. BAT file, and fill in the details later.  For example, you might 
  124. use MAKEMENU to create a menu with options but for each option 
  125. simply execute "ECHO OPTION [#] CHOSEN".  Then later you would 
  126. replace that line in the BAT file with the real command lines.
  127.  
  128. Limitations:
  129.  
  130. Descriptive name may contain up to 45 characters.
  131. Menu text may contain up to 20 lines.
  132. MAKEMENU will prevent you from entering certain characters such 
  133. as DOS redirection operators (<>|) in the menu name and text, and 
  134. from using those keys to choose an option.  This is because DOS 
  135. would misinterpret them in the BAT file.  However, the command 
  136. lines you enter may contain any characters.
  137.  
  138.  
  139. ===========================================================================
  140.  
  141. MAKEMENU is just one of fifty commands from the EasyTool Utilities.  You
  142. already have 14 of them, including MAKEMENU.  You might want to try some of 
  143. the others.
  144.  
  145. For example, here are some command lines you might try for the X Utility:
  146.  
  147. X ECHO [S/\*]
  148. echoes the names of all subdirectories that are immediately under the root 
  149. directory.
  150.  
  151. X TRY RD [S/\*]
  152. removes any of the subdirectories echoed above that are empty.  (TRY is
  153. an EasyTool Utility that suppresses DOS's error message when RD, CD, or MD
  154. fail.)
  155.  
  156. X COPY [FILE1,FILE2,FILE3,*.ARC,*.DOC] A:
  157. is the equivelant of typing "COPY FILE1 A:" then "COPY FILE2 A:" etc.
  158. for each of the filespecs that you list within the brackets.
  159.  
  160. X WS [*.DOC]
  161. will put you into Wordstar with the first ".DOC" file.  When you exit, you
  162. will immediately return to Wordstar with the next ".DOC" file, and so forth
  163. until you have gone through all ".DOC" files.
  164.  
  165. X MAKE [*.EXE,*.COM]
  166. will MAKE all files with extention ".EXE" or ".COM".
  167.  
  168. You get the idea. . .
  169.  
  170.  
  171. HOW TO EXIT
  172.  
  173. You can exit any EasyTool program by pressing Ctrl-C or the Break key.
  174.  
  175.  
  176. HOW TO GET HELP
  177.  
  178. Some helpful information is available when you type the program name followed 
  179. by space and then question mark.  (For example, "PUT ?" will show you some
  180. information about the PUT program.)  The complete documentation is in the
  181. 159 page User Guide, which you will receive when you register.
  182.  
  183. The complete set of EasyTool Utilities include the following commands:
  184.  
  185. access   -- tells if subdirectory or file exists/can be accessed as desired
  186. backward -- reverses sequence of lines or pages
  187. blank    -- blanks screen to help prevent burn-in
  188. calc     -- does calculations using numbers on command line or in file
  189. case     -- converts file to all upper or all lower case characters
  190. col      -- displays column-ruler across screen
  191. colors   -- shows 128 possible color combinations
  192. decode   -- puts graphic characters into file/displays ASCII values
  193. define   -- removes strings and, optionally, replaces them in file
  194. delq     -- asks whether to delete each file matching filespec(s)
  195. demo     -- demonstrates a few Utilities and how you might write a demo program
  196. dinstall -- installs data path in certain EasyTool Utilities
  197. echox    -- copies text multiple times
  198. ensure   -- ensures that last character of file is the desired one
  199. findat   -- extracts or deletes lines from file (enhances DOS find)
  200. get      -- validates data, or lets user enter data
  201. listcol  -- prints text file listing in minimum space/multiple columns
  202. log      -- puts